/**
 *  created by lllwx
 *  date: 2021/10/13
 *  time: 4:56 下午
 *  version: 1.0
 *  desc:
 */
export function helpPlaceholder(formItem: KtForm.IFormSchema, hasLabel = false) {
    if (formItem.componentProps && formItem.componentProps.disabled) {
        return ''
    }
    const label = hasLabel ? formItem.label : ''
    switch (formItem.component) {
        case 'InputTextArea':
        case 'InputNumber':
        case 'Input':
            return `请输入${label}`;
        case 'Select':
        case 'Cascader':
            return `请选择${label}`;
        case 'DatePicker':
        case 'MonthPicker':
            return `请选择${label}`;
        case 'RangePicker':
            return ['请选择开始时间', '请选择结束时间'];
        case 'ImageUpload': {
            return `请上传${label}`;
        }
        case 'RichText': {
            return `请输入${label}内容`;
        }
        case 'Radio':
        case 'Switch':
            return `请选择${label}`;
        default: break;
    }
}
